package org.csu.group4.jpetstore.service;

import org.csu.group4.jpetstore.mybatis.entity.Category;
import org.csu.group4.jpetstore.persistence.CategoryDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryService {
    @Autowired
    CategoryDAO categoryDAO;
    public List<Category> getAll(){
        return categoryDAO.findAll();
    }
    public Category getById(String id){
        return categoryDAO.findByCid(id);
    }
}
